<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<form id="form_user_showedit" method="post" action="../../shiro/user/save.action">
    <input type="hidden" name="userId" value="${sysUser.userId==null?0:sysUser.userId}">
    <table class="tab_form">
        <tr>
            <td><input class="easyui-textbox" name="username" data-options="label:'用户名称:',required:true"
                       value="${sysUser.username}"/></td>
            <td><input class="easyui-textbox" name="loginpass" data-options="label:'用户密码:',required:true"
                       value="${sysUser.loginpass}"/></td>
            <td>
                <input class="easyui-combobox" name="roleIds"
                       data-options="valueField:'id',textField:'text',url:'../../shiro/role/loadComboBoxData.action?userId=${sysUser.userId}',multiple:true" />
            </td>
        </tr>
    </table>
</form>
<div style="text-align:center;padding:5px 0">
    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()" style="width:80px">保存</a>
</div>
<script>
    function submitForm() {
        $('#form_user_showedit').form('submit', {
            success: function () {
                $('#win_main').window("close");
                $("#user_list").datagrid("reload");
            }
        });
    }
    function clearForm() {
        $('#form_user_showedit').form('clear');
    }
</script>